<span class="span-choose-node"><?php echo __d('system','Choose Node Type');?></span>
<div id="wrap-chk-node-type">                
    <?php if(!empty($listField)):?>
        <?php 
        $check = ClassRegistry::init('Node.Field')->find('all',array(
            'conditions'=>array('Field.type_id'=>$node_type_id),
            'recursive'=>-1
        )); 
        foreach($listField as $key=>$values):?>
        <?php
            $chk = '';
            if(!empty($node_type_id)){                 
                if(!empty($check)){
                    foreach($check as $k=>$v){
                        if(strcmp($values['Field']['name'],$v['Field']['name'])==0){
                           $chk = 'checked';break; 
                        }
                    }
                }
            }             
        ?>
            <div class="checkbox">        
                <div class="chk-node-type">
                    <span><input type="checkbox" name="data[NodeType][Field][]" value="<?php echo $values['Field']['id'];?>" <?php if(!empty($chk)){echo $chk;}?>></span>
                </div>
                <label for="RoleNodeType<?php echo $values['Field']['id'];?>"><?php echo $values['Field']['label'];?></label>
            </div>
            <?php endforeach;?>
        <?php endif;?>
</div>
